//
//  JXLSportMainViewController.m
//  JXLSport
//
//  Created by 贾晓磊 on 16/10/23.
//  Copyright © 2016年 贾晓磊. All rights reserved.
//

#import "JXLSportMainViewController.h"
#import "JXLSportSportingViewController.h"
#import "JXLSportTracking.h"
@interface JXLSportMainViewController ()

@end

@implementation JXLSportMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)startSportAction:(UIButton *)sender {
    //1,根据按钮的tag区分类型
    JXLSportType type = sender.tag;
    
    //2,实例化监控控制器
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"JXLSportSporting" bundle:nil];
    JXLSportSportingViewController *vc = [sb instantiateInitialViewController];
    //3,设置运动类型
    vc.sportType = type;
    
    //4,展现控制器
    [self presentViewController:vc animated:YES completion:nil];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
